package com.wardrobe.soa.api.goods_classify;

import com.wardrobe.dao.goods_classify.GoodsClassifyDao;
import com.wardrobe.domain.goods_classify.ClassifyGoodShowBean;
import com.wardrobe.domain.goods_classify.GoodsClassifyBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/11/20.
 */
@Service
public class GoodsClassifyService {
    @Autowired
    private GoodsClassifyDao goodsClassifyDao;

    public List<GoodsClassifyBean> getGoodsClassifyList(){
        List<GoodsClassifyBean> goodsClassifyBeans = goodsClassifyDao.selectGoodsClassify(1);
        return goodsClassifyBeans;
    }

    /**
     * 分类下的商品
     */
    List<ClassifyGoodShowBean> getClassifyGoods(int classifyId){
      return goodsClassifyDao.classifyGoods(classifyId);
    }
}
